package com.uzai.common.enums;

/**
 * @Auther: xiaoyuexl
 * @Date: 2021/8/31 16:16
 * @Description: 红包类型 0注册赠送 1首次查券赠送 2首次下单赠送 3用户申请提现 4公众号关注 5人工发送
 */
public enum RedPackTypeEnum {
    REGISTER_GIVE(0,"注册赠送"),
    FIRST_QUERY_GIVE(1,"首次查券赠送"),
    FIRST_ORDER_GIVE(2,"首次下单赠送"),
    USER_TAKE_BAL(3,"用户申请提现"),
    FOLLOW_WXPUB(4,"关注公众号赠送"),
    MANUAL_SEND(5,"人工发送(手动发送)"),
    FIRST_SETTLED_GIVE(6,"首次收货赠送"),
    REWARD_INVITE(7,"邀请奖励下级赠送"),
    REWARD_INVITE_PARENT(8,"邀请奖励上级赠送"),
    REWARD_INVITE_OTHER(9,"邀请额外奖励"),
    REWARD_INVITE_AGENT(10,"邀请奖励代理赠送"),
    REWARD_INVITE_PARTNER(11,"邀请奖励合伙人赠送"),
    SUPER_CMD_SEND(12,"指令发送"),
    MANUAL_RANDOM(13,"拼手气红包"),
    PULL_GROUP(14,"拉群红包"),
    MARKETING_ORDER_REWARD(15,"订单额外奖励");
    private Integer value;
    private String desc;


    public static final int REGISTER_GIVE_VALUE = 0;
    public static final int FIRST_QUERY_GIVE_VALUE = 1;
    public static final int FIRST_ORDER_GIVE_VALUE = 2;
    public static final int USER_TAKE_BAL_VALUE = 3;
    public static final int FOLLOW_WXPUB_VALUE = 4;
    public static final int MANUAL_SEND_VALUE = 5;
    public static final int FIRST_SETTLED_GIVE_VALUE = 6;
    public static final int REWARD_INVITE_VALUE = 7;
    public static final int REWARD_INVITE_PARENT_VALUE = 8;
    public static final int REWARD_INVITE_OTHER_VALUE = 9;
    public static final int REWARD_INVITE_AGENT_VALUE = 10;
    public static final int REWARD_INVITE_PARTNER_VALUE = 11;
    public static final int SUPER_CMD_SEND_VALUE = 12;
    public static final int MANUAL_RANDOM_VALUE = 13;
    public static final int PULL_GROUP_VALUE = 14;
    public static final int MARKETING_ORDER_REWARD_VALUE = 15;



    RedPackTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc =desc;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static RedPackTypeEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (RedPackTypeEnum type: RedPackTypeEnum.values()) {
            if (type.getValue().intValue() == id) {
                return type;
            }
        }
        return null;
    }
}
